// 测试数据fixtures

export default {
  // 智能体测试数据
  agents: {
    valid: {
      name: '测试智能体',
      description: '这是一个用于测试的智能体',
      systemPrompt: '你是一个有用的助手，请帮助用户解决问题',
      modelConfigId: 'test-model-config-1',
      isActive: true,
    },
    invalid: {
      name: '', // 空名称
      description: '缺少必要字段的智能体',
      systemPrompt: '',
      modelConfigId: '',
      isActive: true,
    },
    list: [
      {
        id: 'agent-1',
        name: '智能体1',
        description: '第一个测试智能体',
        status: 'Running',
        isActive: true,
        createdAt: '2024-01-15T00:00:00Z',
        modelConfig: {
          id: 'config-1',
          name: 'OpenAI GPT-4',
          provider: 'OpenAI',
          model: 'gpt-4',
        },
      },
      {
        id: 'agent-2',
        name: '智能体2',
        description: '第二个测试智能体',
        status: 'Stopped',
        isActive: false,
        createdAt: '2024-01-14T00:00:00Z',
        modelConfig: {
          id: 'config-2',
          name: 'Azure OpenAI',
          provider: 'Azure',
          model: 'gpt-35-turbo',
        },
      },
    ],
  },

  // 模型配置测试数据
  modelConfigs: {
    valid: {
      name: '测试模型配置',
      provider: 'OpenAI',
      model: 'gpt-4',
      apiKey: 'test-api-key',
      apiEndpoint: 'https://api.openai.com/v1/chat/completions',
      maxTokens: 4000,
      temperature: 0.7,
      maxConcurrency: 10,
      costPer1kTokens: 0.002,
      isActive: true,
    },
    invalid: {
      name: '', // 空名称
      provider: '',
      model: '',
      apiKey: '',
      apiEndpoint: '',
      maxTokens: 0,
      temperature: 2.5, // 超出范围
      maxConcurrency: 0,
      costPer1kTokens: -1, // 负数
      isActive: true,
    },
    list: [
      {
        id: 'config-1',
        name: 'OpenAI GPT-4',
        provider: 'OpenAI',
        model: 'gpt-4',
        maxTokens: 4000,
        temperature: 0.7,
        isActive: true,
        createdAt: '2024-01-15T00:00:00Z',
      },
      {
        id: 'config-2',
        name: 'Azure OpenAI',
        provider: 'Azure',
        model: 'gpt-35-turbo',
        maxTokens: 2000,
        temperature: 0.5,
        isActive: true,
        createdAt: '2024-01-14T00:00:00Z',
      },
      {
        id: 'config-3',
        name: 'Claude 3',
        provider: 'Anthropic',
        model: 'claude-3-opus',
        maxTokens: 100000,
        temperature: 0.8,
        isActive: false,
        createdAt: '2024-01-13T00:00:00Z',
      },
    ],
  },

  // 提示词模板测试数据
  promptTemplates: {
    valid: {
      name: '客服助手模板',
      description: '用于客服场景的提示词模板',
      template: '你是一个专业的客服助手，请耐心解答用户的问题。用户说：{user_input}',
      category: 'customer-service',
      isSystem: false,
      version: 1,
      isActive: true,
    },
    invalid: {
      name: '', // 空名称
      description: '缺少必要字段的模板',
      template: '', // 空模板
      category: '',
      isSystem: false,
      version: 0, // 无效版本
      isActive: true,
    },
    list: [
      {
        id: 'template-1',
        name: '客服助手',
        description: '客服场景专用模板',
        template: '你是一个专业的客服助手',
        category: 'customer-service',
        isSystem: false,
        version: 1,
        isActive: true,
        createdAt: '2024-01-15T00:00:00Z',
      },
      {
        id: 'template-2',
        name: '代码助手',
        description: '编程辅助模板',
        template: '你是一个编程助手，请帮助用户编写代码',
        category: 'programming',
        isSystem: false,
        version: 2,
        isActive: true,
        createdAt: '2024-01-14T00:00:00Z',
      },
    ],
  },

  // MCP工具测试数据
  mcpTools: {
    valid: {
      name: '计算器工具',
      description: '基础数学计算工具',
      endpoint: 'http://localhost:8080/calculator',
      schema: {
        type: 'object',
        properties: {
          operation: { type: 'string', enum: ['add', 'subtract', 'multiply', 'divide'] },
          a: { type: 'number' },
          b: { type: 'number' },
        },
        required: ['operation', 'a', 'b'],
      },
      isActive: true,
    },
    list: [
      {
        id: 'tool-1',
        name: '计算器',
        description: '数学计算工具',
        status: 'Running',
        isActive: true,
        endpoint: 'http://localhost:8080/calculator',
        createdAt: '2024-01-15T00:00:00Z',
      },
      {
        id: 'tool-2',
        name: '天气查询',
        description: '天气信息查询工具',
        status: 'Stopped',
        isActive: false,
        endpoint: 'http://localhost:8080/weather',
        createdAt: '2024-01-14T00:00:00Z',
      },
    ],
  },

  // 对话记录测试数据
  conversations: {
    valid: {
      agentId: 'agent-1',
      userInput: '你好，请帮我介绍一下这个平台',
      agentResponse: '欢迎来到CKY Agent Platform！这是一个功能强大的AI智能体管理平台...',
      tokenCount: 150,
      duration: 2500,
      status: 'completed',
    },
    list: [
      {
        id: 'conversation-1',
        agentId: 'agent-1',
        userInput: '你好',
        agentResponse: '你好！有什么可以帮助你的吗？',
        tokenCount: 25,
        duration: 1200,
        status: 'completed',
        createdAt: '2024-01-15T10:30:00Z',
      },
      {
        id: 'conversation-2',
        agentId: 'agent-2',
        userInput: '请写一个Python函数',
        agentResponse: '当然可以！这是一个简单的Python函数示例...',
        tokenCount: 280,
        duration: 3500,
        status: 'completed',
        createdAt: '2024-01-15T11:15:00Z',
      },
    ],
  },

  // 使用统计测试数据
  usageStats: {
    daily: [
      {
        date: '2024-01-15',
        totalRequests: 1250,
        totalTokens: 125000,
        totalCost: 25.50,
        averageResponseTime: 1200,
        successRate: 98.5,
        activeUsers: 45,
      },
      {
        date: '2024-01-14',
        totalRequests: 1180,
        totalTokens: 118000,
        totalCost: 23.60,
        averageResponseTime: 1150,
        successRate: 97.8,
        activeUsers: 42,
      },
    ],
    agent: [
      {
        agentId: 'agent-1',
        agentName: '智能体1',
        requestCount: 850,
        tokenCount: 85000,
        cost: 17.00,
        averageResponseTime: 1100,
        successRate: 99.2,
      },
      {
        agentId: 'agent-2',
        agentName: '智能体2',
        requestCount: 400,
        tokenCount: 40000,
        cost: 8.00,
        averageResponseTime: 1400,
        successRate: 96.5,
      },
    ],
  },

  // 用户测试数据
  users: {
    admin: {
      email: 'admin@example.com',
      password: 'admin123',
      role: 'admin',
      name: '管理员',
    },
    user: {
      email: 'user@example.com',
      password: 'user123',
      role: 'user',
      name: '普通用户',
    },
  },

  // API响应模拟数据
  apiResponses: {
    success: {
      code: 200,
      message: '操作成功',
      data: {},
    },
    error: {
      code: 400,
      message: '请求参数错误',
      details: {},
    },
    unauthorized: {
      code: 401,
      message: '未授权访问',
    },
    notFound: {
      code: 404,
      message: '资源不存在',
    },
    serverError: {
      code: 500,
      message: '服务器内部错误',
    },
  },

  // 分页数据
  pagination: {
    default: {
      skipCount: 0,
      maxResultCount: 10,
      total: 50,
    },
    large: {
      skipCount: 0,
      maxResultCount: 100,
      total: 1000,
    },
  },
};